package fr.inria.atlanmod.dummy;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.emf.ecore.EObject;

public class Mock
{
	
	/**
	 * Un test para que el verificador retorne el mismo objeto que le llega por parametro
	 */
	EObject dummyObject;
	
	public Mock()
	{
		
	}
	
	public boolean verifyModel(EObject object)
	{
		try
		{
			
			Thread.sleep(6000); 
			dummyObject=object;
		}
		catch(InterruptedException e)
		{
			System.out.println("awakened prematurly");
		}
		return Math.random() < 0.5;
	}
	
	public List<EObject> getObjectsToMark()
	{
		ArrayList<EObject> objs = new ArrayList<EObject>();
		objs.add(dummyObject);
		return objs;
	}

	public void cancelVerifyModel()
	{
		
		System.out.println("llega aca");
		Thread.interrupted();
	}

}
